﻿using AutoTest.Domain.Enums;
using SqlSugar;

namespace AutoTest.Domain.Entities
{

	/// <summary>
	/// 用户表
	/// </summary>
    [SugarTable("t_user_info", TableDescription = "用户表")]
    public class UserInfo : AllBaseEntity
	{
		///<summary>
		/// 主键ID
		///</summary>
		[SugarColumn(IsPrimaryKey = true, ColumnName = "id", ColumnDescription = "主键Id")]
		public long Id { get; set; } = 0;
		///<summary>
		/// 头像Url地址
		///</summary>
		[SugarColumn(ColumnName = "icon_url", ColumnDescription = "头像Url地址")]
		public string IconUrl { get; set; } = string.Empty;
		///<summary>
		/// 用户名
		///</summary>
		[SugarColumn(ColumnName = "user_name", ColumnDescription = "用户名")]
		public string UserName { get; set; } = string.Empty;
		///<summary>
		/// 昵称
		///</summary>
		[SugarColumn(ColumnName = "nick_name", ColumnDescription = "昵称")]
		public string NickName { get; set; } = string.Empty;
		///<summary>
		/// 真实姓名
		///</summary>
		[SugarColumn(ColumnName = "real_name", ColumnDescription = "真实姓名")]
		public string RealName { get; set; } = string.Empty;
		///<summary>
		/// 电话
		///</summary>
		[SugarColumn(ColumnName = "phone", ColumnDescription = "电话")]
		public string Phone { get; set; } = string.Empty;
		///<summary>
		/// 邮箱地址
		///</summary>
		[SugarColumn(ColumnName = "email", ColumnDescription = "邮箱地址")]
		public string Email { get; set; } = string.Empty;
		///<summary>
		/// 密码
		///</summary>
		[SugarColumn(ColumnName = "password", ColumnDescription = "密码")]
		public string Password { get; set; } = string.Empty;
		///<summary>
		/// 性别，0：位置；1：男；2：女
		///</summary>
		[SugarColumn(ColumnName = "sex", ColumnDescription = "性别，0：未知；1：男；2：女")]
		public EnumSex Sex { get; set; } = EnumSex.Unknown;
		///<summary>
		/// 性别
		///</summary>
		[SugarColumn(ColumnName = "sex_name", ColumnDescription = "性别")]
		public string SexName { get; set; } = string.Empty;
		///<summary>
		/// 国家
		///</summary>
		[SugarColumn(ColumnName = "country", ColumnDescription = "国家")]
		public string Country { get; set; } = string.Empty;
		///<summary>
		/// 省
		///</summary>
		[SugarColumn(ColumnName = "province", ColumnDescription = "省")]
		public string Province { get; set; } = string.Empty;
		///<summary>
		/// 市
		///</summary>
		[SugarColumn(ColumnName = "city", ColumnDescription = "市")]
		public string City { get; set; } = string.Empty;
		///<summary>
		/// 银行卡
		///</summary>
		[SugarColumn(ColumnName = "credit_card", ColumnDescription = "银行卡")]
		public string CreditCard { get; set; } = string.Empty;
		///<summary>
		/// 父级Id
		///</summary>
		[SugarColumn(ColumnName = "parent_id", ColumnDescription = "父级Id")]
		public long ParentId { get; set; } = 0;

		/// <summary>
		/// 上上一级
		/// </summary>
		[SugarColumn(ColumnName = "parent_parent_id", ColumnDescription = "上上一级")]
		public long ParentParentId { get; set; } = 0;

		/// <summary>
		/// 根级
		/// </summary>
		[SugarColumn(ColumnName = "root_id", ColumnDescription = "根级")]
		public long RootId { get; set; }
		///<summary>
		/// 层级树
		///</summary>
		[SugarColumn(ColumnName = "parent_path", ColumnDescription = "层级树")]
		public string ParentPath { get; set; } = string.Empty;
		///<summary>
		/// 注册时间
		///</summary>
		[SugarColumn(ColumnName = "create_time", ColumnDescription = "注册时间")]
		public DateTime CreateTime { get; set; } = DateTime.Now;
		///<summary>
		/// 有效时间
		///</summary>
		[SugarColumn(ColumnName = "valid_time", ColumnDescription = "有效时间")]
		public DateTime ValidTime { get; set; } = DateTime.Now;
		///<summary>
		/// 有效状态，0：无效；1：有效
		///</summary>
		[SugarColumn(ColumnName = "status", ColumnDescription = "有效状态，0：无效；1：有效")]
		public EnumStatus Status { get; set; } = EnumStatus.Enable;
		///<summary>
		/// 邀请码
		///</summary>
		[SugarColumn(ColumnName = "invite_code", ColumnDescription = "邀请码")]
		public string InviteCode { get; set; } = string.Empty;
		/// <summary>
		/// 是否是合伙人
		/// </summary>
		[SugarColumn(ColumnName = "is_coper", ColumnDescription = "是否是合伙人")]
		public bool IsCoper { get; set; } = false;
		/// <summary>
		/// 收款码Url地址
		/// </summary>
		[SugarColumn(ColumnName = "pay_code_url", ColumnDescription = "收款码Url地址")] 
		public string PayCodeUrl { get; set; } = string.Empty;

	}
}
